#include "fan_device.h"
#include "driver_fan.h"
#include <string.h>

static int FanInit(struct FanDevice *pDev)
{
    FAN_GPIO_Init();
    return PDSUCCESS;
}


static int FanCtrl(struct FanDevice *pDev, int status)
{
    return FanSetStatus(pDev, status);
}


static fanDevice FanDevice = {
	.name = "FAN",
	.Init = FanInit,
	.Ctrl = FanCtrl
};


pFanDevice GetFanDevice(char *name)
{
    if(strcmp(name, "FAN") == 0)
    {
        return &FanDevice;
    }
    return NULL;
}








